<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <h1>登录</h1>
    <form action="login" method="post" enctype="multipart/form-data">
        <input type="text" placeholder="user" name="user">
        <input type="text" placeholder="password" name="password">
        <input type="submit" value="login">
    </form>
</div>
<div>
    <h1>getEmailCode</h1>
    <form action="getEmailCode" method="post" target="_blank">
        <input type="text" name="email" value="" placeholder="email">
        <input type="submit" value="提交">
    </form>
</div>
<div>
    <h1>getResetEmail</h1>
    <form action="getResetEmail" method="post">
        <input type="text" name="email" value="" placeholder="email">
        <input type="text" name="captcha" placeholder="captcha">
        <img src="captcha/default" alt="" id="captcha">
        <input type="submit" value="提交">
    </form>
</div>
<div>
    <h1>registerByPhone</h1>
    <form action="registerByPhone" method="post" target="_blank">
        <input type="text" value="" placeholder="手机号" name="phone">
        <input type="text" value="" placeholder="验证码" name="code">
        <input type="text" value="" placeholder="密码" name="password">
        <input type="submit" value="register">
    </form>
</div>
<div>
    <h1>验证旧密码修改密码</h1>
    <form action="updatePassword" method="post" enctype="multipart/form-data" target="_blank">
        <input type="text" placeholder="oldpassword" name="oldpassword">
        <input type="text" placeholder="newpassword" name="newpassword">
        <input type="submit" value="submit">
    </form>
</div>
<div>
    <h1>increaseStudyTime</h1>
    <form action="increaseStudyTime" method="post" enctype="multipart/form-data" target="_blank">
        <input type="text" name="minutes" placeholder="minutes">
        <input type="submit" value="update">
    </form>
</div>
<div>
    <h1>updateHead</h1>
    <form action="updateHead" method="post" enctype="multipart/form-data">
        <input type="file" name="avatar" accept="image/jpeg,image/png,image/gif">
        <input type="submit" value="上传">
    </form>
</div>
<div>
    <h1>addUserLesson</h1>
    <form action="addUserLesson" method="post" enctype="multipart/form-data" target="_blank">
        <input type="number" name="lesson">
        <input type="date" name="date">
        <input type="time" name="start">
        <input type="time" name="end">
        <input type="number" name="type">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    <h1>delUserLesson</h1>
    <form action="delUserLesson" method="post" enctype="multipart/form-data" target="_blank">
        <input type="number" name="lesson">
        <input type="submit" value="删除">
    </form>
</div>
<div>
    <h1>increaseStudyTime</h1>
    <form action="increaseStudyTime" method="post" enctype="multipart/form-data">
        <input type="number" max="600" min="0" name="minutes">
        <input type="submit" value="增加">
    </form>
</div>
<div>
    <h1>addHardWords</h1>
    <form action="addHardWords" method="post" enctype="multipart/form-data">
        <input type="number" name="words[]" placeholder="word">
        <input type="number" name="words[]" placeholder="word">
        <input type="number" name="words[]" placeholder="word">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    <h1>addRememberWords</h1>
    <form action="addRememberWords" method="post" enctype="multipart/form-data">
        <input type="number" name="words[]" placeholder="word">
        <input type="number" name="words[]" placeholder="word">
        <input type="number" name="words[]" placeholder="word">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    <h1>addRememberSentences</h1>
    <form action="addRememberSentences" method="post" enctype="multipart/form-data">
        <input type="number" name="sentences[]" placeholder="sentences">
        <input type="number" name="sentences[]" placeholder="sentences">
        <input type="number" name="sentences[]" placeholder="sentences">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    <h1>delHardWords</h1>
    <form action="delHardWords" method="post" enctype="multipart/form-data">
        <input type="number" name="hards[]" placeholder="word">
        <input type="number" name="hards[]" placeholder="word">
        <input type="number" name="hards[]" placeholder="word">
        <input type="submit" value="删除">
    </form>
</div>
<div>
    <h1>addHardSentences</h1>
    <form action="addHardSentences" method="post" enctype="multipart/form-data">
        <input type="number" name="sentences[]" placeholder="sentence">
        <input type="number" name="sentences[]" placeholder="sentence">
        <input type="number" name="sentences[]" placeholder="sentence">
        <input type="submit" value="添加">
    </form>
</div>
<div>
    <h1>updatePlan</h1>
    <form action="updatePlan" method="post" enctype="multipart/form-data">
        <input type="number" name="time" placeholder="time">
        <input type="number" name="word" placeholder="word">
        <input type="number" name="sentence" placeholder="sentence">
        <input type="submit" value="修改">
    </form>
</div>
<div>
    <h1>Test Url</h1>
    <ul>
        <li>
            <a href="test/server" target="_blank">test/server</a>
        </li>
        <li>
            <a href="test/host" target="_blank">test/host</a>
        </li>
        <li>
            <a href="test/sentences" target="_blank">test/sentences</a>
        </li>
        <li>
            <a href="test/getUserHardSentences" target="_blank">test/getUserHardSentences</a>
        </li>
        <li>
            <a href="test/getUserHardWords" target="_blank">test/getUserHardWords</a>
        </li>
        <li>
            <a href="test/weibo">test/weibo</a>
        </li>
        <li>
            <a href="test/weiboView">test/weiboView</a>
        </li>
    </ul>
</div>
<div>
    <h1>public</h1>
    <ul>
        <li>
            <a href="getSentencesByLesson?lesson=1" target="_blank">getSentencesByLesson?lesson=1</a>
        </li>
        <li>
            <a href="getWordsByLesson?lesson=1" target="_blank">getWordsByLesson?lesson=1</a>
        </li>
        <li>
            <a href="getAllLessons" target="_blank">getAllLessons</a>
        </li>
        <li>
            <a href="getLessonsByBook?book=1">getLessonsByBook?book=1</a>
        </li>
        <li>
            <a href="getBooksByMaterial?material=1">getBooksByMaterial?material=1</a>
        </li>
        <li>
            <a href="getAllBooks">getAllBooks</a>
        </li>
    </ul>
</div>
<div>
    <h1>User</h1>
    <ul>
        <li>
            <a href="getUserLesson?lesson=1" target="_blank">getUserLesson?lesson=1</a>
        </li>
        <li>
            <a href="getUserAllLessons" target="_blank">getUserAllLessons</a>
        </li>
        <li>
            <a href="increaseLessonCount">increaseLessonCount</a>
        </li>
        <li>
            <a href="getHardWords">getHardWords</a>
        </li>
        <li>
            <a href="getHardSentences">getHardSentences</a>
        </li>
        <li>
            <a href="getUserAllRememberWords">getUserAllRememberWords</a>
        </li>
        <li>
            <a href="getUserAllRememberSentences">getUserAllRememberSentences</a>
        </li>
        <li>
            <a href="getUserRememberWordsWithPaging?limit=5&index=1&order=desc">getUserRememberWordsWithPaging</a>
        </li>
        <li>
            <a href="getTestWords?lesson=1">getTestWords?lesson=1</a>
        </li>
        <li>
            <a href="getUserLessonDaily?date=2017-07-21">getUserLessonDaily</a>
        </li>
        <li>
            <a href="getUserLessonWeek">getUserLessonWeek</a>
        </li>
        <li>
            <a href="getUserLessonMonth">getUserLessonMonth</a>
        </li>
        <li>
            <a href="testPlay?lesson=2&type=word">testPlay?lesson=2&type=word</a>
        </li>
        <li>
            <a href="getUserRecord">getUserRecord</a>
        </li>
        <li>
            <a href="increaseDaliyTime?time=2">increaseDaliyTime?time=2</a>
        </li>
        <li>
            <a href="increaseDaliyWord?words=5">increaseDaliyWord?words=5</a>
        </li>
        <li>
            <a href="getDaliyLog">getDaliyLog</a>
        </li>
    </ul>
</div>
<div>
    <h1>AJAX</h1>
    <button id="DD">dfasdf</button>
    <button id="CS">getCustomerService</button>
    <button id="help">getHelp</button>
    <button id="AU">getAboutUs</button>
</div>
<!--<button id="code">获取验证码</button>-->
<script src="jquery-3.2.1.min.js"></script>
<script>
    var $btn = $('#code');
    var $img = $('#captcha');
    $btn.click(function () {
       $.ajax({
           type: 'POST',
           url: 'getRegisterPhoneCode',
           data: {
             phone: $('input[name=phone]').val()
           },
           success: function (data) {
                console.log(data);
           },
           error: function () {

           }
       })
    });

    var $DD = $('#DD');
    $DD.click(function () {
               $.ajax({
           type: 'GET',
           url: 'testPlay',
           data: {

           },
           success: function (data) {
                console.log(data);
           },
           error: function () {

           }
       })
    });

    var $cs = $('#CS');
    $cs.click(function () {
        $.ajax({
            type: 'GET',
            url: 'getCustomerService',
            data: {},
            success: function (data) {
                console.log(data);
                $('body').append(data.data.content);
            },
            error: function () {

            }
        })
    });

    var $h = $('#help');
    $h.click(function () {
        $.ajax({
            type: 'GET',
            url: 'getHelp',
            data: {},
            success: function (data) {
                console.log(data);
                $('body').append(data.data.content);
            },
            error: function () {

            }
        })
    });

    var $AU = $('#AU');
    $AU.click(function () {
        $.ajax({
            type: 'GET',
            url: 'getAboutUs',
            data: {},
            success: function (data) {
                console.log(data);
                $('body').append(data.data.content);
            },
            error: function () {

            }
        })
    });

//    $(function () {
//        $.ajax({
//            type: 'GET',
//            url: 'getCaptcha',
//            data: {
//
//            },
//            success: function (data) {
//                if(data.code === 1)
//                {
//                    $img.attr('src', data.data);
//                }
//            },
//            error: function () {
//
//            }
//        })
//    });
</script>
</body>
</html>